
<div class="member_l">
    <?php if ($_GET['action'] != 'suathongtincanhan' && $_GET['action'] != 'xemanh') { ?>
        <div class="mb_l_bg" style="position: relative">
            <span class="avatar" >
                <img id="leftavatar" src="<?php
    if ($member->isOwner()) {
        echo $common->get_avatar_thumb($_SESSION['client']['avatar']);
    }else
        echo $common->get_avatar_thumb($_SESSION['mem']['avatar']);
        ?>" />
            </span>
            <?php if ($member->isOwner()) { ?>
                <div class="actiondiv" ><span class="right"><a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=suathongtincanhan&option=4"><img width="16" height="16"  alt="" src="/images/b_edit.png"></a></span><a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=suathongtincanhan&option=4">Cập nhật ảnh đại diện </a></div>
            <?php } ?>
        </div>
    <?php } ?>
    <?php if ($member->isOwner()) { ?>
        <div class="mb_l_bg">
            <ul>
                
                <li >
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=thongtincanhan"><span class="icon"><img alt="" src="/images/16x16/id_card.png"></span>Thông tin cá nhân</a>
                </li>
                <li>
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=suathongtincanhan&option=4"><span class="icon"><img alt="" src="/images/16x16/user.png"></span>Ảnh đại diện</a>
                </li>
                <li>
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=xemalbum"><span class="icon"><img alt="" src="/images/16x16/photo_camera.png"></span>Hình ảnh</a>
                </li>
                <li class="end have_sub_menu">
                    <a href="javascript: " onclick="slide_toogle_menu(this);return false;"><span class="icon"><img alt="" src="/images/16x16/mail.png"></span>Tin nhắn<span class="bullet"></span></a>
                    <ul class="submenu">
                        <li><a href="/thanh-vien?mid=<?php echo $_SESSION['client']['id']; ?>&action=hopthu"><span style="cursor: pointer" >Hộp thư đến</span><span  id="show-inbox-left"><span class="number-section"><span class="number-section-main" id="total-inbox-left">(<?php echo $numInboxUnRead;?>)</span></span></span></a></li>
                        <li class="end"><a href="/thanh-vien?mid=<?php echo $_SESSION['client']['id']; ?>&action=thudagui"><span style="cursor: pointer" >Hộp thư đi</span></a></li>
                    </ul>
                </li>
            </ul>
            <!--
            <div style="margin: 10px 0;float: left;text-align: center;width: 100%"><a href="/thanh-vien?mid=<?php echo $_SESSION['client']['id']; ?>&action=thongtincanhan"><img alt="" src="/images/addfriend_btn.jpg"></a></span></div>
            -->
        </div>
    <?php } else { ?>

        <div class="mb_l_bg">
            <ul>
                <li >
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&view=private"><span class="icon"><img alt="" src="/images/16x16/world.png"></span>Trang cá nhân</a>
                </li>
                <li >
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=thongtincanhan"><span class="icon"><img alt="" src="/images/16x16/id_card.png"></span>Xem thông tin cá nhân</a>
                </li>
                <li>
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>&action=xemalbum"><span class="icon"><img alt="" src="/images/16x16/photo_camera.png"></span>Xem ảnh</a>
                </li>
                <li>
                    <a href="javascript:showSendMsgTo('<?php echo $_GET['mid']; ?>');"><span class="icon"><img alt="" src="/images/16x16/mail.png"></span>Gửi tin nhắn</a>
                </li>
                <li id="liOffline">
                    <a href="javascript:;"><span class="icon"><img alt="" src="/images/16x16/offline.gif"></span>Offline</a>
                </li>
                <li id="liOnline" style="display: none">
                    <a href="javascript:;" lang="<?php echo $_SESSION['mem']['id'];?>"><span class="icon"><img alt="" src="/images/16x16/online.png"></span>Online</a>
                </li>

            </ul>
            <!--
            <div style="margin: 10px 0;float: left;text-align: center;width: 100%"><a href="/thanh-vien?mid=<?php echo $_SESSION['client']['id']; ?>&action=thongtincanhan"><img alt="" src="/images/addfriend_btn.jpg"></a></span></div>
            -->
        </div>
    <?php } ?>


    <?php
    if ($_GET['action'] == 'xemanh') {
        $rsImages = $member->getMyImageExcept(intval($_GET['mid']), intval($_GET['aid']), intval($_GET['image_id']));
        ?>

        <div class="container_block margintop15">
            <div class="title">Ảnh cùng album
                <div class="pagination-top">
                    <a class="next right next-btn" href="javascript:void(0);" onclick=""></a>
                    <a class="prev left previous-btn" href="javascript:void(0);" onclick=""></a>

                </div>
            </div>
            <ul class="block_list w180">
                <?php while ($row = $db->fetch_array($rsImages)) { ?>
                    <li>
                        <a class="thumb" href="<?php echo '/thanh-vien?mid=' . $row['mid'] . '&aid=' . $row['aid'] . '&image_id=' . $row['id'] . '&action=xemanh'; ?>"><img src="<?php echo $common->get_img_thumb($row['image']); ?>" alt="Ảnh cùng album"></a>

                    </li>
                <?php } ?>
            </ul>
        </div>
    <?php } ?>
    <?php
    $rsFriend = $member->getAllFriend(18);
    if ($db->num_rows($rsFriend) > 0) {
        ?>
        <div class="container_block margintop15 friend marginbottom15">
            <div class="title">Bạn bè (<?php echo $db->num_rows($rsFriend); ?>)
                <div class="pagination-top">
                    <a class="next right next-btn" href="javascript:void(0);" onclick=""></a>
                    <a class="prev left previous-btn" href="javascript:void(0);" onclick=""></a>

                </div>
            </div>
            <ul class="block_list w180">
                <?php while ($row = $db->fetch_array($rsFriend)) { ?>
                    <li>
                        <a class="thumb" href="<?php echo 'thanh-vien?mid=' . $row['id']; ?>&view=private"><img src="<?php echo $common->get_avatar_thumb($row['avatar']); ?>" title="<?php echo $row['fullname']; ?>" alt="<?php echo $row['fullname']; ?>"></a>
                        </br><a  href="<?php echo '/thanh-vien?mid=' . $row['id']; ?>&view=private"><span  title="<?php echo $row['fullname']; ?>"><?php echo $row['last_name']; ?></span></a>
                    </li>
                <?php } ?>
            </ul>
        </div>
  
    
    <?php } ?>
</div>
